1. Field of the Invention
The present invention relates generally to computerimplemented compilers or interpreters for high-level programming languages and their associated run-time environments, and in preferred embodiments, to a computer-implemented method, apparatus, and article of manufacture for solving the Year 2000 problem using a compiler or interpreter.
2. Description of the Related Art
Computer systems used in various processing applications, such as, for example, processing insurance information, account information, inventory information, investment information, retirement information, as well as many other applications, often operate with records and data containing date-dependent information. In many computing systems, date information relating to years has typically been represented in two-digit year formats, where two digits represent a year between 1900 and 1999. Thus, for example, the two digits "97" would represent the year 1997. Popular usage of this simplified date information format throughout the computer industry has resulted in an industry-recognized problem, often referred to as "the year 2000 problem."
More specifically, as a result of this simplification of date information, upon the turn of the century (i.e., upon the year 2000), two-digit year information intended to represent a year within the 21st century will, instead, be indistinguishable by computer systems from a year within the 20th century (i.e., between 1900 and 1999). Thus, for example, a two-digit year value of "08" which is intended to represent the year 2008 will be indistinguishable from the year 1908 by such computer systems.
Various solutions to the "year 2000 problem" have been suggested. However, previously proposed manners of implementing such solutions have been tedious, expensive and error-prone, rendering such implementations economically impractical in many contexts.
For example, three widely recognized techniques to address the year 2000 problem are: expansion, windowing, and compression. The expansion technique, in general, involves a conversion of 2-digit years to 4-digit years. This solves the problem of ambiguity. However, because the size of the field is larger after expansion, prior proposals to implement this technique have required modifications to application logic, data files, and databases, etc. (including backup copies). In addition, processing routines involving date information would have to be rewritten to accommodate four-digit year data. The costs and conversion time associated with such modifications can eliminate this as a practical option.
According to the windowing technique, a 2-digit year field is interpreted as a year within a 100 year window of time. In the past, the year values, ranging from 0 to 99, were interpreted within the 100 year window of 1900 to 1999. The windowing technique simply allows the programmer to specify a window with a set of values different than from 1900 to 1999, for example, from 1960 to 2059. In the simple form of this technique, a single window is used for all windowed items in the executable module.
In addition to this "single" window technique, multiple windows may be supported by allowing different window values to be defined for each program variable in the source module. For example, values representing birth dates ranging from 1920 to the present may coexist in a module with values representing retirement dates ranging from 1960 to 2059. Multiple windows provide a significant additional capability in terms of flexibility and power.
This fixed windowing technique can be extended to a "sliding" window concept. In this implementation, the window is defined as an offset from the current year. For example, an item could be defined as windowed from 30 years prior to the current year to 69 years after the current year so that in 1997 the window would be from 1967 to 2066. Another windowing technique involves a "variable window" which may be changed each time a program is run, rather than fixed when the program is compiled. Windowing does not require changes to date data in databases and in other recorded media. However, prior windowing proposals required changes to program logic (typically in source programs) which, in the past, was accomplished by modifying each instance in a source code in which date information is used. Tools, such as Vantage YR2000.TM. from Millennium Dynamics, FIELDEXTM from STA America and 2000-Resolve.TM. from Micro Focus, have been developed to help analyze and modify source code statements. However, such source code modifications tend to increase the complexity of the source code, make debugging operations more difficult and, in some cases, increase the propensity for errors.
According to compression techniques, values greater than 99 are stored in the same space previously used to store two-digit year values. One previous manner proposed for implementing this function involved changing the datatype, for example, from character to binary, thus allowing values as large as 32,767 in the same two-byte field. However, such prior proposals require changing all recorded data to the new datatype, as well as changing program data declarations and, in some cases, program logic. Procedures for effecting such changes can be relatively complex, time consuming and error prone.
Therefore, although techniques have been developed for addressing the year 2000 problem, there is still a need in the art for a method which allows the problem to be addressed in an economical and practical manner.
As discussed in more detail below, embodiments of the present invention relate to a manner of addressing the year 2000 problem, using a compiler. A compiler is a computer program that translates a source program into an equivalent object program. The source language is typically a high-level language like COBOL, PL/I, C++, and the object language is the assembly language or machine language of some computer. The translation of the source program into the object program occurs at compile time; the actual execution of the object program occurs at run-time.
A compiler must perform an analysis of the source program and then it must perform a synthesis of the object program, wherein it first decomposes the source program into its basic parts, and then builds the equivalent object program parts from the source program parts. As a source program is analyzed, information is obtained from declarations and procedural statements, such as loops and file I/O statements.
Compilers for the COBOL, PL/I, and C++ programming languages are well known in the art. In addition, run-time environments for COBOL, PL/I, or C++ based computer programs are also well known in the art.
Further embodiments of the present invention relate to a manner of addressing the year 2000 problem, using an interpreter, as opposed to a compiler. An interpreter is a program that interprets source code and, with the computer, performs computations directly, as opposed to a compiler that processes the source code and turns it into object or compiled code, that in turn performs computations when it is subsequently executed.